<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>有点东西</title>
    <link rel="shortcut icon" href="../static/icon/favicon.ico" />
    <style>
      * {
        padding: 0;
        margin: 0;
      }
      .outer {
        width: 857px;
        height: 600px;
        border: 1px solid black;
        position: absolute;
        left: 550px;
        top: 100px;
        background-image: url("../static/img/404.jpg");
      }
      #forward {
        position: relative;
        font-size: 16px;
        color: red;
        left: 355px;
        top: 470px;
      }
    </style>
  </head>
  <body>
    <div class="outer">
      <span id="forward"></span>
    </div>
  </body>
  <script>
    window.onload = function () {
      let waitTime = 3;
      let forward = document.getElementById("forward");
      (function redirect() {
        if (waitTime > 0) {
          forward.innerText = waitTime-- + "秒后跳转到首页";
          setTimeout(arguments.callee, 1000);
        } else {
          location.href = "01.html";
        }
      })();
    };
  </script>
</html>
